home *** CD-ROM | disk | FTP | other *** search
Wrap
/* Image Engineer ARexx macro script */ /* by Simon Edwards */ /* 2/9/96 */ /* This fakes a sort of oil painting effect */ Options results signal on error /* Setup a place for errors to go */ if arg()==0 then exit 'GET_NUMBER "Maximum distance to displace" 1 128 "Ok|Cancel" 2 SLIDER' distance=RESULT source=arg(1) 'PROJECT_INFO' arg(1) 'TYPE' if RESULT=='COLOUR' then do 'CONVERT_TO_GREY' arg(1) workingproject=RESULT CALL disperse CLOSE workingproject end else do workingproject=arg(1) CALL disperse end if distance>12 then distance=12 'MEDIAN' rough 2*distance-1 2*distance-1 CLOSE rough exit disperse: 'NOISE' workingproject '100 INTENSITY RANDOM' tmp1=RESULT MARK tmp1 ALPHA MARK source PRIMARY DISPLACE distance 0 BEST dis1=RESULT CLOSE tmp1 'NOISE' workingproject '100 INTENSITY RANDOM' tmp1=RESULT MARK tmp1 ALPHA MARK dis1 PRIMARY DISPLACE 0 distance BEST rough=RESULT CLOSE tmp1 CLOSE dis1 return exit /*******************************************************************/ /* This is where control goes when an error code is returned by IE */ /* It puts up a message saying what happened and on which line */ /*******************************************************************/ error: if RC=5 then do /* Did the user just cancel us? */ IE_TO_FRONT LAST_ERROR 'REQUEST "'||RESULT||'"' exit end else do IE_TO_FRONT LAST_ERROR 'REQUEST "Error detected!!!'||D2C(10)||'Image Engineer error message is as follows'||D2C(10)||result||D2C(10)||'Script failed on line '||SIGL||'"' 'Doh!' exit end